package com.kaisu.blog.domain.user;

import com.kaisu.blog.common.util.IdUtils;
import lombok.Data;

/**
 * @author kaisu
 */
@Data
public class Follow {
    /**
     * id
     */
    private String id;
    /**
     * 表示关注该用户的用户
     */
    private User follower;
    /**
     * 表示该用户关注的用户
     */
    private User following;
    public static Follow create(User follower, User following) {
        Follow follow = new Follow();
        follow.setId(IdUtils.generateId());
        follow.setFollower(follower);
        follow.setFollowing(following);
        return follow;
    }
}
